//
//  KFDEFTHoldingTableViewCell.m
//  KFD
//
//  Created by JIRENTIANXIANG on 6/24/15.
//  Copyright © 2015 kfd. All rights reserved.
//

#import "KFDETFHoldingTableViewCell.h"
#import "NSDate+format.h"
#import "KFDETFHolding.h"
#import "ui_config.h"

@interface KFDETFHoldingTableViewCell ()

@property (weak, nonatomic) IBOutlet UILabel *dateLabel;
@property (weak, nonatomic) IBOutlet UILabel *valueLabel;
@property (weak, nonatomic) IBOutlet UILabel *changeLabel;

@end

@implementation KFDETFHoldingTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setEFTHolding:(KFDETFHolding *)holding
{
    self.dateLabel.text=holding.date.year_month_day;
    self.valueLabel.text=holding.nums;
    self.changeLabel.text=holding.change_nums;
    self.changeLabel.textColor=holding.change_nums.floatValue<0?KFD_DOWN_COLOR:KFD_UP_COLOR;
}

@end
